<template>
    <div class="header">
      <div class="header-left iconfont">&#xeb15;</div>
      <div class="header-input iconfont">&#xeafe; 输入城市/景点/游玩主题</div>
      <router-link to="/city">
        <div class="header-right iconfont">{{city}} &#xe614;</div>
      </router-link>
    </div>
  </template>
  
  
  <script>
  import {mapState} from 'vuex'
  export default {
      name:"HomeHeader",
      computed:{
        ...mapState(['city'])
      }
  }
  </script>
  
  <style lang="stylus" scoped>
    @import '~styles/varibles.styl'
    .header
      display: flex
      line-height: $headerHeight 
      background: $bgColor
      color: #fff
      .header-left
        width: .44rem
        float: left
        padding-left: .2rem
      .header-input
        flex: 1
        background: #fff
        margin-top: .12rem
        height: .64rem
        line-height: .64rem
        margin-left: .2rem
        border-radius: .1rem
        color: #ccc
        padding-left: .1rem
      .header-right
        //这里只去限制它的最小宽度，真正的宽度由字体撑开，方便使用flex自动分配宽度 
        min-width: 1.04rem
        padding: 0 .1rem
        float: right
        text-align: center
  </style>